package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

@Data
//alt+insert
@TableName("t_user") //指定對應的表
public class User {
   @TableId(type = IdType.AUTO)
   private int id;
   private String username;
   private String password;
   private String birthday;

   //描述用戶的1所有訂單
   @TableField(exist = false)
   private List<Order> orders;

}
